﻿namespace WizardEngine.Core.Specification
{
    public interface IStepBinder<T> where T : FlowState
    {
        /// <summary>
        /// Binds the requested step to the current definition context. 
        /// </summary>
        /// <param name="stepName">Already registered step name. </param>
        /// <returns>Requested step. </returns>
        /// <exception cref="StepNotFound" />
        IStepSpecification<T> BindStep(string stepName);

        /// <summary>
        /// Checks whether given step is possible binding result. 
        /// </summary>
        /// <param name="step">Step specification. </param>
        /// <returns>True if given step can be binded, false otherwise. </returns>
        bool IsBindable(IStepSpecification<T> step);
    }
}